package com.multiple.sources.core.servie.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.multiple.sources.core.bean.Tenant;
import com.multiple.sources.core.mapper.TenantMapper;
import com.multiple.sources.core.servie.api.ITenantService;

/**
 * <p>
 * 租户  服务实现类
 * </p>
 *
 * @author limao
 * @since 2017-08-31
 */
@Service
public class TenantServiceImpl implements ITenantService {
	@Autowired
	private TenantMapper tenantMapper;

	@Override
	public Tenant findTenantByUserId(Long userId) {
		// TODO Auto-generated method stub
		return tenantMapper.findTenantByUserId(userId);
	}

	@Override
	public int deleteByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return tenantMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Tenant record) {
		// TODO Auto-generated method stub
		return tenantMapper.insert(record);
	}

	@Override
	public int insertSelective(Tenant record) {
		// TODO Auto-generated method stub
		return tenantMapper.insertSelective(record);
	}

	@Override
	public Tenant selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return tenantMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(Tenant record) {
		// TODO Auto-generated method stub
		return tenantMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Tenant record) {
		// TODO Auto-generated method stub
		return tenantMapper.updateByPrimaryKey(record);
	}
	
}
